//
//  CZStatusBottomView.swift
//  iOSWeibo10
//
//  Created by 李伟鹏 on 16/5/16.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

class CZStatusBottomView: UIView {

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        preapreUI()
    }
    
    private func preapreUI() {
        addSubview(retweetButton)
        addSubview(commentButton)
        addSubview(zanButton)
        retweetButton.snp_makeConstraints { (make) -> Void in
            make.leading.top.bottom.equalTo(self)
        }
        commentButton.snp_makeConstraints { (make) -> Void in
            make.leading.equalTo(retweetButton.snp_trailing)
            make.top.bottom.equalTo(self)
            make.width.equalTo(retweetButton)
        }
        zanButton.snp_makeConstraints { (make) -> Void in
            make.leading.equalTo(commentButton.snp_trailing)
            make.top.trailing.bottom.equalTo(self)
            make.width.equalTo(retweetButton)
        }
    }
    
    private lazy var retweetButton: UIButton = UIButton(bkgImageName: "timeline_card_bottom_background", imageName: "timeline_icon_retweet", title: "转发")
    
     private lazy var commentButton: UIButton = UIButton(bkgImageName: "timeline_card_bottom_background", imageName: "timeline_icon_comment", title: "评论")
    
    private lazy var zanButton: UIButton = UIButton(bkgImageName: "timeline_card_bottom_background", imageName: "timeline_icon_unlike", title: "赞")
}
